#include<iostream>
#include<string>

using namespace std;
int a[7];

bool check(string& x)
{
    int s1 = 0, s2 = 0;
    for (int i = 0; i <= 2; i++)
    {
        s1 += x[i] - '0';
    }
    for (int i  = 3; i < x.size(); i++)
    {
        s2 += x[i] - '0';
    }
    return s1 == s2;
}
int main()
{
    int n; cin >> n;
    for (int i = 1; i <= n; i++)
    {   
        string x;
        cin >> x;
        if (check(x)) cout << "You are lucky!" << endl;
        else cout << "Wish you good luck." << endl;
    }
    return 0;
}